add command enums
tag command
refactored into library; error codes