Updated to latest APIs