important addings and fixes