implement floor and ceiling