TWEETNEST DJANGO WEB APPLICATION
Bachelor of Science (Information Technology)
Session: 2021-2025 Fall
Submitted By:
Student Name Roll Number
Muhammad Huzaifa 2213016
Haseeb Ahmed 2213037
SUPERVISOR
Dr. FAHAD AHMED
_____________________________________________________________________
DEPARTMENT OF COMPUTER SCIENCE
NATIONAL COLLEGE OF BUSINESS ADMINISTRATION &
ECONOMICS
TWEETNEST DJANGO WEB APPLICATION
PROJECT
Submitted in Partial Fulfillment
of the Requirements for the
Degree of
Bachelor of Science (Information Technology)
At the
National College of Business Administration & Economics
By
Student Name Registration
Muhammad Huzaifa 2213016
Haseeb Ahmed 2213037
Supervisor Head of Department
Department of Computer Science Department of Computer Science
DECLARATION
It is declared that this is an original piece of my own
work, except where otherwise acknowledged in text and
references. This work has not been submitted in any form for
another degree or diploma at any university or other
institution for tertiary education and shall not be submitted
by me in future for obtaining any degree from this or any
other University or Institution. I am the responsible if I do
not meet the deadline.
Signature: ______________________
Name: ______________________
Registration No.: ______________________
DEDICATION
I dedicate my work to my respectable Parents, Teachers and my loving Brothers
Sisters and for their cooperation and support to achieve this goal.
CERTIFICATION OF APPROVAL
Supervisor ___________________
Co-Supervisor (if any) ___________________
Project Coordinator ___________________
Head of Department ___________________
ACKNOWLEDGEMENT
In the name of Allah Almighty, Most Gracious, Most Merciful
First of all, I am thankful to Allah Almighty, the most beneficial and merciful who
gave me the courage and guidance to complete my project. I offer my special praise
for our beloved Holy Prophet Hazrat Muhammad (S.A.W) who is the symbol of
knowledge and guidance of humanity as a whole. I like to express my special thanks
of gratitude to my supervisor Mr./Ms. Xyz for his support. His steadfast support of
this project was greatly needed and deeply appreciated. Last but not least, no
acknowledgement could ever express our obligations to our loving parents for their
love, affection, amiable, advices and prayers for my success.
TABLE OF CONTENTS
LIST OF FIGURES
-----------------------------------------------------------------------------
Figure 1.1 14
-
-----------------------------------------------------------------------------
Figure 1.2 15
-
-----------------------------------------------------------------------------
Figure 2.1 28
-
LIST OF TABLES
-----------------------------------------------------------------------------
Table 3.1 23
-
-----------------------------------------------------------------------------
Table 4.1 34
-
-----------------------------------------------------------------------------
Table 4.2 35
-
CHAPTER 1
INTRODUCTION
This project is a Django-based web application that serves as a clone of Twitter.
It replicates core functionalities such as user authentication, posting tweets, following
other users, and viewing timelines.
Basically, in this chapter we introducing the main
steps of our project. This introduction contains the
Introduction, Aims/Objectives, Literature Survey, What
Android Are Made Of, Stuff at Your Disposal, Why
Android, Motivation, Statement of the Problem, Problem
definition, Problem Explanation, Objective of the Study,
Limitation and Enhancement of the Study, Organization of
the Report. This material of introduction helps to understand
the main issues related to this project.
1.1 Introduction
In today’s world cell phones play a very important
role in everyone’s life? It provides multiple options like
voice and video conversations, GPS tracking system,
multimedia and internet usage. Radio signals are constantly
being broadcasted by cell phones and hence can trace a lost
mobile. Mobile phone tracking technology can be deployed
in any GSM supported handsets. All cell phones constantly
send signals to its nearest towers hence it is been possible to
track a lost phone accurately.
Phone Spy Security and Tracker (PSST) is a project
which is based on GPS satellite tracking system which is
been used by cars and road transport industry from years.
GSM phone tracking is likely to show the radius in which the
phone is located but not the exact place and even accuracy
depends on factors like network coverage, landscape and
weather conditions also. When we couple GPS with Google
maps the postal address of the lost mobile can be found
accurately.
1.2 Aim and Objectives
Phone Spy Security and Tracker is an application
based on Android which helps us to track the location of the
smart phones and catch the unauthorized person who trying
to access the phone. It consists of Android client application
which automatically sends Email when SIM card is changed.
Position tracker works on GPS and GPRS. PSST will fetch
latitude and longitude satellites and send it as Email,
moreover it retrieves the postal address from Google maps.
To recover lost mobile phones thus creating a fear
psyche in thieves that they cannot get away with mobile
phones which means we can monitor any cell phone and
helping those who cannot afford to lose their expensive cell
phones.
1.3 Literature Survey
Android is a very user friendly operating system for
mobile devices which includes key applications, middleware
and even uses Linux Kernel modified version.
It was primarily developed by Android Inc., soon after Google purchased it
andcurrentlyOpenHandsetAlliance.ItallowsdeveloperstowritecodesinJavalanguageand
the devices are controlled using Java libraries developed by Google. Google released
most of its android code using Apache License which is a free software and open
source license.
Android devices are mostly mobile phones based.
Android technology can be used in other areas as well like
PCs, car dashboards but mostly it is being used in phones
right now. In recent years mobile phones are capable of
providing internet access because of the trend like text
messaging and Apple’s IPhone products. These days smart
phone which supports internet access is gaining more
popularity. So it makes more interesting working with
android applications, which is an interesting technology as
well as fast moving market segment.
1.4 What Android Are Made of
While writing applications on desktop, you are
“master of your own domain”. You can launch main window
and no of child windows as in dialog boxes. From our view
point we are on our own, features which are supported by
OS, and mostly unaware of any other programs running at
same time. While there is no interaction between other
programs we can communicate with MySQL or any other
database typically using an API like frameworks a top it.
Android has comparably same concepts packaged in a
different way and structured for crash-resistant.
1.4.1 Activities
Activity can be explained as building block of user
interface. We can consider activity as Android analogue for
window or dialog in desktop application. It can even be
possible that activity not having a user interface, while the
code packaged in the structure of services or content
providers.
1.4.2 Content Providers
For any data stored in a device Content Providers
offer a level of abstraction which is accessible by various
applications. In android development it encourage us to
make our own data which can be accessed by other
applications and even build our own content provider which
gives you a complete control over how that data can be
accessed.
1.4.3 Intents
System messages which run inside the device,
various applications notification such as hardware changes
like SD card inserted, notifications of incoming data like
Email arrived and even application events are called as
Intents. It doesn’t only allow you to respond to such intents
but also to initiate other activities or let know when
particular event occurs such as suggest WIFI availability
when in range.
1.4.4 Services
All the above stated Activities, intent receivers and
content providers are all short term and can be terminated
any time whereas services are intended to run continuously
independent of other activities such as play music while
using other applications, in here music controlling is no
longer available but the service keep running in the
background.
1.5 Stuff at Your Disposal
1.5.1 Network
Android based devices are generally with Internet
ready. We can take benefit of internet as we wish in any
level from raw java sockets to built-in Web browser which is
based on Web kit.
1.5.2 GPS
Most of the android devices have access to GPS
which can tell where the device is exactly located on the
earth using Google Maps. GPS also helps in locating the
desired location where we want to travel and even shows the
places around us where we commonly go in everyday life
which makes it easy to travel otherwise can be to locate the
device and its movements in case the device is stolen.
1.5.3 Phone Services
Android devices are similar to other phones which
are typically used to make calls, send SMS and can be used
for multimedia applications to download music anytime
anywhere and games and everything else what we expect
from a modern telephonic technology.
1.6 Why Android
Zero start-up cost to begin development with
The tool required to develop any android applications
is free of cost and Google charge very small fee deal out
application in the market.
1.6.1 Freedom to innovate
Android OS is an open source platform which is
based on Linux kernel and other open source libraries.
Moreover are free to build applications which runs on
android devices and even free to extend platform as well.
1.6.2 Freedom to collaborate
Android developers are encouraged to share code
with others and they don’t even have to sign an NDA to do
this. According to a survey conducted by Black Duck
Software, the amount of open source libraries and mobile
applications grew at a rate of 168% faster on Android
compared to any other platform.
1.6.3 Multi-platform support
Android OS are supported on several different
hardware devices including various phones and tablets.
1.6.4 Multi-carrier support
Android powered smart phones are offered by most
of the carrier services
1.7 Motivation
Almost every owner of a costly mobile handset fears
the nightmare of losing his mobile phone. We have come
across many middle class people losing costly mobiles and
unable to get back the same even with the help of police
officers. And in Pakistan there is no system in place to help
such people. Seeing their plight and the upcoming android
platform which promises to be present on ever upcoming
handset.
1.8 Statement of the Problem
Phone Spy Security and Tracker is an application
based on Android which helps us to track the location of the
smart phones and catch the unauthorized person who trying
to access the phone. It consists of Android client application
which automatically sends email when SIM card is changed.
Position tracker works on GPS and GPRS. PSST will fetch
latitude and longitude satellites and send it as Email,
moreover it retrieves the postal address from Google maps.
1.8.1 Problem Definition
When the mobile user loses his mobile phone, in
Pakistan as well as in many parts of world there is no
mechanism in place which can help the owner of the mobile
recover his mobile phone. Herein we propose to develop a
system which is autonomous and intimates with the owner
via email when it detects SIM change.
1.8.2 Problem Explanation
As soon as the thief steals the mobile phone he tries
to change the SIM card. This mean he/she has to switch off
the phone and change it then reboot it.
On boot completion the system has to detect SIM
card change and intimate the owner about it. When the user
receives Email intimating him about the SIM change he/she
precedes with further action whether to inform law
enforcement authorities or extract the location of the mobile
or postal address of the mobile phone where it is present
currently.
1.8.3 Objective of the Study
To recover lost mobile phones thus creating a fear psyche in thieves that they cannot
get away with mobile phones. Monetizing by helping poor chaps who could not afford
to lose a mobile phone. To touch as many human lives as much we can and receive
their good wishes.
1.9 Project Plan
Details: In this application user needs to register by
providing Email and setting a Password which is then
updated anytime.
Features: The different type of features all over the
application will be up to date and new features will
implement regularly.
1.9.1 Work Breakdown Structure
Figure 1.1 Work Break down Structure
1.9.2 Gantt chart
Figure 1.2 Gantt chart
1.10 Limitations and Enhancements of Study
Our system can be installed on only mobile phones
with Android operating system. Further on SIM change
Email can be received. To get the location of the mobile
phone it needs to have GPS built in it. To get the postal
address the mobile should have GPS as well as GPRS and be
connected to the internet.
Further improvement of the system can perform the following functionalities.
Functionality of our system can be extended so that
when requested it sends the recent call log through which the
owner can contact the recently dialed numbers of thief and
get to know more about the thief.
We proposed to add functionality later wherein the
owner of the mobile can
retrievehisdatastoredonthemobileviainternetandcanaddordele
tehispersonaldataon the phone.
1.11 Organization of the Report
In this report we have briefly described about the
introduction of our project. How it works, its limitations,
future enhancements. We have also explained about system
requirements and specification in which we have specified
about the users and their characteristics, Product Perspective,
overview of functional requirements and data requirements,
general constraints, assumptions dependencies,
guidelines ,the user view of product use and hard ware and
software requirements. We have also explained about
system.
Design description in which we describe about the
layout of the phone spy security and tracker, technologies
used, design considerations, modules of the system,
interfaces, data flow diagrams and the detail system design.
We have also explained about module implementations and
different testing processes.
CHAPTER 2
SYSTEM REQUIREMENTS & SPECIFICATIONS
2.1 Purpose of this Document
The idea of whole document is to represent bounded
physical representation of body of information what we
designed have the capacity to communicate or not. This
document contains diagrammatic, symbolic and sensory-
representational information of the whole project. This
document produces an artifact by collecting and representing
information.
Thisdocumenthelpstheusertounderstandabouttheproje
ctinalucidmanner.Thedocumentation gives an overview of
functional requirements and data requirements. This
document explains hardware and software Requirements,
user view of product use, general constraints and guidelines
of a project.
Documentation is nothing but a method of
communicating what the whole project is about. Objective,
realistic and complete are the important factors kept in mind
while writing satisfactory documentation. So adequacy of the
project is not based on length, format, complexity or volume.
No standardized documentation is described to write for
projects. The whole process of implementation, operation of
system and development is based on a proper documentation.
Documentation helps in different ways like maintaining the
project and also reference to the user like at any point any
help required about the project, it can be understood by
having a look at the documentation.
Documentation can also be done by embedding
proper comments in the executable code of the modules.
Parenthesis, spaces, blank lines along with suitable loops
around the comments block were used to improve the
readability.
2.1.1 Document Conventions
When writing the SRS document for "PHONE SPY
SECURITY AND TRACKER" the following terminologies
are used to make the document more effective and readable
we used font:
Times New Roman
Line spacing: 2 line spacing
FontSize: 12pt
Headings: 14pt
Headings are bold.
This document is intended to the audience and also
for those End Users who really want to know for what
purpose this application is developed for.
2.1.2 Intended Audience:
People of all ages having a Smart phone.
2.2 General Description
2.2.1 Users and Their Characteristics
Owner of the mobile phone will install our software,
start our application enter his Email and password and then
commit it into database. When he loses his mobile he waits
for an Email from PSST. He receives that Email with
location or postal address etc.
Thief changes the SIM of mobile phone as soon as
possible. On SIM change our system is triggered then
intimation is sent to alternate users Email.
2.2.2 Product Perspective
PSST would be widely used as people are concerned
about their mobile phones. Moreover the software needs very
less memory and the package can be downloaded over
internet. This Application is developed to help people to
secure mobile phone from theft as well as from unknown
person.
2.2.3 Product Functions:
Features:
Register
Login (email, password)
Send Email Alert
Detect SIM Changes
Support multiple Languages
User Function:
Register
Login
Edit Profile
2.2.4 Assumptions and Dependencies
In this application, the user must create an account
and register his/her self through email verification. User
must have a Smartphone and at least 5.1 versions of Android
or above. Also, the entire project will be executed by using
GPRS and GPS mechanism as are quest for all the operation
claimed for the functional aspect of this project. User must
remember the password that he/she gives in signup account
to login into his/her account.
2.3 External Interface Requirements
2.3.1 User Interfaces
The application provides a user-friendly and
interactive user interface. In this application, the user will
easily understand the use of every element and enjoy the user
experience.
2.3.2 Hardware Interface:
Hard Disk: 5GB
Memory: 1GB RAM
Android Phone with Marshmallow and higher
GPS and GPRS Support
2.3.3 Application interface:
Android Studio
XML
Java
2.4 System Features
2.4.1 User registration
Description Priority
User registration has a priority value. Whenever the
user installs the application and working for the first time,
he/she has to get registered first.
Stimulus/Response Sequences:
The application launched from the Android home screen
User is prompted to profile Data
A form gets open to enter the fields
Info goes to the database and gets stored in the database.
After registration, the user is prompted to dashboard
Functional Requirements
User gets registered and is able to use the app.
2.4.2 Login/logout
Description and Priority
User has to authenticate if he/she is not logged in.
He/she can also logout if wanted. This feature has 2 nd highest
priority at most.
Stimulus/Response Sequences
The application launched from the Android home screen
User is prompted to login
A form gets open to enter the fields
Info goes to the database and gets compared bye existing info
After authentication, the user is prompted to dashboard
If the user is logging out, simply user is session out
Functional Requirements
User gets logged in/logged out.
2.5 Other Non-functional Requirements
2.5.1 Performance Requirements
Android versions would be greater than 5.1for better performance of an
application.
User must have a good internet connection to really enjoy the performance of
an application.
Size of the application should be small that it can be accessible in every
mobile if mobile is low storage mobile.
2.5.2 Safety Requirements
Only authorized member or user can log in into an
application. Data should be saved in encrypted form so that
incase of attack or hack data will be unreadable or
unacceptable.
2.5.3 Software Quality Attributes
Privacy and security of the user is our basic and most
important motive.
Availability:
Users can access their accounts anytime anywhere.
Integrity:
Better component design to get better performance at
peak time.
Correctness:
Application is design in that way that it should be
free from errors.
Reliability:
Application is reliable and the user can trust that it's
100% reliable.
Security:
Application is 100% secure and users save their data
with no worry. Before storing data on a database, data is
encrypted so that no one can access or steal user's personal
information.
Easy to Use:
Application is easy to use and learn.
2.6 Other Requirements
The system must store the entire User information in
Database. For each user data saved with its unique email id
in the database.
CHAPTER 3
USECASE ANALYSIS
3.1 Use Case Model:
Figure3.1 Use Case Model
3.2 Fully Dressed Use Cases
Registration
Fully Dressed Use Case
• Use case Name Registration
• Scope Register function
• Level User goal
• Actor User
• Stakeholder User
• Pre-Condition Internet Connection
• Post-Condition Login
• Success Scenario Registered
• Extension -
Table3.1 Use Case<01>
Login
Fully Dressed Use Case
• Use case Name Login
• Scope Login
• Level User Goal
• Actor User
• Stakeholder User
• Pre-Condition • Must be registered
• Must be online
• Post-Condition Access to Timeline
• Success Scenario Successfully login
• Extension •
Table3.2 Use Case<02>
Edit Password
Fully Dressed Use Case
• Use case Name Edit Password
• Scope Password
• Level User Goal
• Actor User
• Stakeholder User
• Pre-Condition • Must be Login
• Internet Connection
• Post-Condition The password should be edit with a new password
• Success Scenario Password Edit successfully
• Extension --
Table3.4 Use Case<04>
CHAPTER 4
SYSTEM DESIGN
The system design describes the system requirement,
operating environment system and subsystem architecture,
files and database design, input format, output layout, user
interface, detailed design processing logic, an external
interface.
4.1 Architecture Diagram
We divided system architecture in three-part
application, services & authentication and database, As
Shown in the figure.
Figure 4.1 Architecture Diagram
4.2 Entity Relationship Diagram
Figure 4.2 Entity relationship diagram
4.3 Sequence/Collaboration Diagram
Figure 4.3 Sequence Diagram (Registration)
4.4 Operation contracts
Figure 4.4Sequence Diagram (login)
Operation contracts #1
Operation name: Registration (Email, Password)
Cross Reference: Use case Registration
Pre-condition: User should be online
Post-condition User will be associated with profile (login)
Objective: User
Attribute:(Email, Password)
Association: relationship between user and registration
Table 4.1 Operation Contracts-01
Operation contracts # 3
Operation name: Update profile(Password)
Cross Reference: Use case Update Profile
Pre-condition: User should be logged in and online
User record updated
Objective: User
Attribute:(Password)
Post-condition:
Association: relationship between user and Update profile
Table 4.3 Operation Contracts-03
4. 5 Activity Diagram:
Figure 4.5Activity Diagram
4.6 State Transition Diagram
Figure 4.6 State Transition Diagram (Registration)
4.7 App Interference
Figure 4.7 State Transition Diagram (Login)
4.7.1 Registration panel:
Figure 4.8 Registration Panel
4.7.2 Login panel
Figure 4.8 Login Panel
4.7.3 General Setting with coding
Figure 4.9 General Setting with Coding
4.7.4Advanced setting with coding:
Figure4.9 Advanced Setting with Coding
CHAPTER 5
IMPLEMENTATION
5.1 Important Flow Control/Pseudo codes:
Figure5.1 Important Flow Control/Pseudo codes
5.2 Components, Libraries and stubs:
Libraries
Libraries are a collection of diverse functions that are
utilized in the creation of a project to make the various
functions easier to perform. The functions are linked to the
libraries, making it simple to conduct tasks across many
activities. A list of the many libraries used in our project is
provided below.
Android SDK
Java JDK
Google Maps API
Geo fencing API
5.3 Deployment Environment
Android studio
Windows10 pro
Firebase Services
5.4 Tools and Techniques
Java
Android Studio
XML
JavaScript (If needed)
Best Practices/Coding Standards
Code should not have any trailing whitespace to avoid creating unnecessary
diff issues.
Function and classes are always commented on showing expected input and
output
GUI should be user-friendly
Let photos say what you can’t say
Document everything
Demand for Feedback
CHAPTER 6
TEST AND EVALUATIION
6.1 Testing and Evaluation
Testing is a procedure for detecting problems in a
program. We execute a simulation test on the system to
ensure that any errors or bugs are not there. Various
scenarios and forms of testing will be used to determine
whether or not the system is functioning properly. If any
faults are discovered throughout the testing, provide a
solution to the errors. In this chapter, we cover the entire
system testing and assessment process, including how to use
the system and what work each feature has completed.
6.2 Use Case Testing
Various scenarios, such as user and admin
functionality, are being tested throughout this session.
Use Case Testing is a software testing technique that
helps to identify test cases that cover entire system on a
transaction-by-transaction basis from start to end. Test cases
are the interactions between users and software application.
EST cases based on use cases and are referred as scenarios.
Capability to identify gaps in the system which would not be
found by testing individual components in isolation. Very
effective in defining the scope of acceptance tests.
Main success scenario:
Actor: User
No. Steps Description
1 Registration To get access to the system a user must get
registered
2 Login Login to the system with correct name and
password System will redirect to next page
3 Alert Email Send alert email with intruder selfie and
current location
4 SIM Change Send alert email with SIM info and current
location
Table 6.1 Use Case Testing-01
Extensions (Errors):
No. Step Description
1-a Login failed Login failed if admin enter wrong
username System will display an error
message
1-b Login failed Login failed if admin enter wrong
password. System will display an error
message
2 Registration failed Registration will failed if a new user
doesn’t follow the rules. System will
display an error message
Table 6.2Usecase testing extension
6.3 Boundary value analysis
Boundary testing is a type of testing that takes place
between a starting point and the extreme ends of arrange of
input values, or between partials of input values.
Login username
A person's username must be correct and unique
when entering it in the text field during login.
If the username is incorrect, the system will block the
user from accessing the dashboard page.
Login password
The username entered in the text field during login
must be accurate.
If the user name is incorrect, the system will block the user from accessing the
dashboard page.
Text fields:
The system must allow only correct text in all text
fields.
The user must add only the information that is required and brief.
Alphanumeric field:
The alphanumeric fields must accept alphabet,
character and numbers.
Alphanumeric fields are password.
6.4 Performance testing:
Test case title: System response time testing
Test type Performance testing Test result
Required performance The required response time of the
System is less than 2 seconds
System performance The actual performance response time Test passed
is
2 seconds.
Table6.3 Performance Testing01
Test case title: Activity load time testing
Test type Performance testing Test result
Required performance The required page load time of the
System is less than 3 seconds
System performance The actual page load time is 2 Test passed
seconds.
Table6.4 Performance Testing02
Test case title: Huge number of users
Test type Performance testing Test result
Required performance System should perform normally and
Efficiently with a large number of
users
System performance System performed all activities Test passed
normally
with a large number of users.
Table6.5 Performance Testing03
Test case title: Waiting time testing
Test type Performance testing Test result
Required performance The average waiting time of the
System is less than 3 seconds
System performance The actual performance response Test passed
time is 2 seconds in some
circumstances.
Table6.6 Performance Testing04
Test case title: Connection establish time testing
Table6.7 Performance Testing05
Test case title: Database send/get information time testing
Test type Performance testing Test result
Required performance The system should save or retrieve
data from database in less than 2
seconds.
System performance The actual time system sends or gets Test passed
information to database in 1 second.
Test type Performance testing Test result
Required performance The connection must be established
in
Less than 2 seconds
System performance The actual connection establishes Test passed
time is about 1 second.
Table6.8 Performance Testing06
6.5 Stress Testing:
Stress testing is a method of determining a system's
stability and dependability. Stress testing is a technique for
determining a system's ability to handle flaws and faults.
Stress testing is a technique for evaluating a system's ability
to handle errors under harsh conditions.
We overload our system and analyze its behavior in
extreme settings to confirm that it behaves normally during
stress. In bad conditions, the (PSST app) management
system behaves regularly and all of its features and functions
work as expected.
Through this testing, we monitor our system and make sure our system,
System should save all data before crashing
Make sure the connection from server, If server no response, wait on login
current page
The system should accurately display the deletion and updating of records.
Improvement:
As we all know, there is always room for
improvement in every management system. The following
are some basic changes that we should make in the future:
Physical count:
It is a good strategy to rely on inventory systems, but
we should never completely rely on them. In addition, we
should translate words into multiple languages.
App quality:
For use, quality is quite crucial. Always keep a close
eye on quality control and never skimp on it.
System level:
Our system should not be clogged with too much
data. We should only give the user with the most basic
information. Otherwise, the user may feel perplexed and will
be unable to use our app.
6.6 CONCLUSION AND FUTURE WORK
Existing PHONE SPY SECURITY AND TRACKER
APP can only send Email and details about Intruder selfie
and SIM with GPS co-ordinates or postal address when theft
or unauthorized person is detected.
Future work of the system can perform the following
functionalities. The developed and previously tested
functionalities can be modified later with more user-friendly
functions to make the system more useful.