fixed insertion query