Refactor this for new formatting