fixed deprecated functions