changed findById to find with query