Added stored procedure for security