updated deprecated API usage