simplified default case and added comments