changed database keys to use int