changed get_by_slug method