Ternary, bugs fixed

ternary is created, specified the measurement of the room.