function delete added; function main_page rewrited