added regex for function declarations