included feedback stuff of @edenman and some optimizations