Implemented conditions. Max still broken.