fixed null pointer error in manager class and added dao