created method which adds hours worked to db