Attempt at procedures

- doesn't work properly but added in the code to create the trigger in
the DDL just in case