better organized, still doesn't work