need to fix ajax posting maybe change to jquery instead