adding mnesia query