added ajax call to check if paper exist in db.