fixed R script, made eval script with timeout