cleanup
add errors handling