removed while loops, improved consistency
changed naming for consistency
?