Initial function close; input to be fixed