ugly code for adding numbers