using the Gavin idea making an interface for typesafety