Updated for better plotting