updated some code & texts; deleted unnecesary functions; small refactorization; updated version