editing to get it to work