added gen_server to generate ids