adding prototypes and enhancing clase