register working now, implementing query