make finding id routine to outside class