Added code in GUI to include x[0] and so on