redoing everything with better understanding