making it work with ubuntu. adding db initialization code.