Fixed Duplicated Code