fixed bug. now full functional