added account table, better design, added some scala code to test