Improve to new API