adapting sql views
translating constants
renaming method