cleaned up (put code from 2 places into single round_up() function)
cleaned up (put code from 2 places into single round_up() function)

realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core