addition control flow isssues
split equally case