changed method invocation on objects to use 'apply' to match method signatures