basically funcion goes through