introduced some function/object approach. Yay for undefined values and scopes