Changed code to run with simplecv