finished refactotHHNNNNNG