First version
Added spec tests