fix some issues
add testing