break some huge functions a part