added check_result() and directory restructured