replaced hardcoded integer values in TextInterface with enum values.