combined functions to single file