added floor and redesigned init