all functions moved to methods module