better mask, cleaned resources up