inner functions not working properly.