working out step functions and specs