work on mysql templates