splits logic in multiple files