added ball function
added database.yml file with postgres