complete those two functions