favorites function

Needs to be tested on the server