added floor function