more fixes (brackets and errors) and tests