implemented refresh; small fixes