all classes and functions are written but its not working