test
added medium detection