added a few improvements