Refactor to use interface in order to allow primitives without coercion