Add ajax functionality; not finished