fixes #43 global variable removed