All functions are roughly implemented