changed processing order, added check for status, moved container creation to lib-accounts