finishing touches to functionality