moving some of the sparse representation into internal module