Changed variable name and moved plot method