removed gui dependancies in some methods