adding Function and ScopeFunction type
adding implementation for Function and ScopeFunction