fix regex to match function declaration
add more test
travis yaml