Trying to fix calculation