really need to fix this mysql stuff