struct plots replaced by a class; this makes the code more readable