simplified prototype + bugfix