adding pseudo code to split