Changed for use with main gui file