added functions and stuff