closes #24, closes #23, closes #22, closes #11