made lots of changes. ajax is working