user-part mostly done