1st part of code that was genrated with test. Also database with api was added