first complete implementation of new y marking strategy. not working properly yet.