Added plot call ti main for testing purpose