GR 42 - restrict fields

@twinge, please review
use a case statement instead of multiple if/elseif statements.