function defaults

Need to add refactoring for error