got errors working and looking better than alert boxes