complete + prepare functions