Added code for new, experimental way of calculating