core stuff is here, need to work on sorting ties