fixed findby method