floor and ceil functions added