fixed implementation mistake