figured out how to split up code