Removed some redundancy and made values pass properly