added shortcut for creating prototyped function in JS