added some function stuff