some coding pieces