register and view (partially) working