fixed some ambiguous variable naming and added options to bar