added functions for reader