added methods for GUI