modified to install flex package required to build