first commit. maybe all function is added. can not find a way to detect wrong input