removed test and added mainfunction
removed tests and added main