added self opperating function