remove hack and tidy