added and refined a few things