Added rounding. Should refactor this soon, too much duplicate code