changed synchronized to do lowest account number first