Converting more methods into functions