cleaned up magic numbers