Moved to using properties and worked with encoder