added plotting (poorly)