Added use of cupid function