@Override
	public void actionPerformed(ActionEvent e) {
		String command = e.getActionCommand();
		if (command.equals("Save")) {
			Contact contact = createContact();
			if (!contact.getFirstName().equals("")){
				this.contacts.add(contact);
				this.gui.clearFields();
			} else {
				JOptionPane.showMessageDialog(null, "All contacts must have a first name. Please try again", "Missing first name" ,JOptionPane.ERROR_MESSAGE );
			}
		} else if (command.equals("Save as")) {
			int returnState = fc.showSaveDialog(null);
			if (returnState == JFileChooser.APPROVE_OPTION) {
				this.contactWriter.setFile(fc.getSelectedFile());
				try {
					this.contactWriter.writeContacts(contacts);
				} catch (IOException e1) {
					JOptionPane.showMessageDialog(null, "An error occured while saving. Please try again", "File not found" ,JOptionPane.ERROR_MESSAGE);
				}
			} 
		}
	}