Revert 3bf7ff7..cce81ef

This rolls back to commit 3bf7ff76b9c9fbb093980827d4e60b6a8864389a.
reverted from my last commit and fixed some isses