not sure why this code is here. need to debug.