fixed bug where cannot define and call function in same line
bug fixes