cleaning up + adding tests