Tests re-writen