change regex to handle method declarations with interspersed spaces between all elements