updated with recent SDK changes