added function keyword and array support