rough wrking functionallity