Added concept of modes