change Direction data type to our own