cleaned up class initiation and added some decorators