first phase coding