fixed problem with single column indexing
added functions for timematr