made it work but there are still cases to cover. I am checking for method declaration now but that should be parameter instead