Apple shares up 3% after company beats earnings expectations