added few aux functions