some improvements added (from todo list)