split code, should help with formatting