removed unnecesary math and "ceil" calls