merged some functions; closes #10