added function stuff