checked refctoring