need fix wrongly inserted function