added readbyid functionalities