Removed redundant calculations