Change solution to use plot instead of ggplot