Removed redundant code after more testing