works in both run and standalone jar