updates and partial referenced right. also partial logic
corrected partial logic