break down code for easier expansion