use respond_to for safety. thanks supermomonga!