a bit less horrible code