added do while cycle to keep code running