adding useful functions