adding assembly function