Added a method to serialize from withing the terminal