changing logic. not working.