removed slice function