Updated parsing functions for db