added check for mass assignment and made id methods private