added some ruffle code