implemented test fixed bug