tested and failed at making a good split function