getting rid of compound functions