Updated to work with current version