better code logic, less duplication
upgrade to prompt@0.2.11