moved some functionality