my try at goos in scala