remove unused and unexported function