regS changed to float