fixes; TODO must be refactored