Revert "Revert "merging with steven's""

This reverts commit 2986ac0120ee0c206065712a87dcf30069ba4bd3.
fixing
fixed revert problems, latest working