cleaned up decorator code