quick fix, make it like the function above