changed keyfloor to be dynamic