Reverted to original version

Original version, old efforts kept as comments