refctored