Added onstep hook