closes #3 e solves problems on #4