updated code to future CLI support