decleration-- not tested and need refectoring