fixing break to create function