change x@n to accept n within promise
bug fix, cleanup