added method function to schema to add instance functions to models. added tests for static and method.