Overriding methods and conforming to protocols in swift