Roger Federer announces when he will retire