added in some minor changes

minor logic changes