setting functionality and other fixes added