changed time check from updated_at to created_at