bwt: works
ps1: complete
ps1: removed the lambda function