added support for starred tasks, improved sorting