a_star functions