added most of the functions and almost finished working on the handler
we will need to change the handler later maybe we will split the call
backs into different classes