scope function instead of object