added constructor for GUI