changes thanks to Will