working prototype of analyze command