Started adding code
Added new code to handle by for normal functions