mix functions and properties into a prototype