Changed in order to work with online database