cleaned up broken code