why a case here when you don't have a case variable? a simple if/elsif/else would suffice. Indentation is also screwy