main ruby file and engine