readded chris' code