added more variables to shape pulse