finish functions/speed, not tests yet