refactoring how rotation is calculated - don't trust metadata
update version