add "has" function + some fixes