fixed but should find better way