added ceil function