initial working implementation
added dtype
add test