moving method definitions to the bottom of the file