Revert "Revert "working version""

This reverts commit acd4284ba09bd6668f0862b9d48bfd6200beba95.