cleanup ruby syntax