base code inserted.. debuging needed.