simplified findById code + corrected frontend