developing love function