Submission for the waterloo engineering programming competition