added handling of invalid id in params
using find_or_intialize_by_id instead