Added another constructor to use it from GUI