Revert "added some code for standalone-use"

This reverts commit d2a9ef142a8faf725ba028dc8843a26f98daf581.
Added standalong function