small changes to referalls functionality