Functionized

To use debugger