split the whole code into smaller parts