changed api for findById callback. Fixed tests