some changes for better testing
add tests