updates for user and some tests and sample code