working with js prototypes except on controller