revert changes - working version