Added rep function