construct runnable test env
fix one overflow bug