writting tables correctly, setting up specs for db