seperate function parameter from braces
add while block trigger