prepare ajax mechanizom - need cleaning