Added labels and stuff to function