Adapted code