Added ruby callbacks