better exceptions handling
better exceptions handling
map function
use vector instead of repa