changed test to TY and add some functionality