updated
fixed deprecated functions