refactor layers
refactor step and repeat