Added STAR logic, untested