made a few improvements