move account history to *.c file