Added functionality. Copied to my kinect stuff