added prediction with 2 states