changed magnitude from int to Integer