Added implementation of output struct and variables