neatened db + new functions