multiple fixes in oneStep and subfunctions
fixed issues with isValid and subfunctions