added code from other places for temp