added ir learn functionality and routing