fixed timing issue
adding test for PTOS