Modified to fit v1.4+ functionality