marker detection compiling - errors in distance calculations still