Fixed pin usage, method signature refactored.