First compelte prototype for db accoutning