code formatting
add tests