cleanup of ruby syntax