extended changes in previous commit to basis.jl