improve account handling