resolved all issues #1 - #6