fixed nearly all issues