cleaned up messiness