implement account join and unit tests for