Breaking the system into functions